<?php
/**
 * Created by PhpStorm.
 * User: llk
 * Date: 2016/8/30
 * Time: 23:11
 */
namespace app\models;

use yii\db\ActiveRecord;

class UctooMenu extends ActiveRecord
{
    public static function testsql()
    {
        return self::find()
//            ->where(['pid' => 0])
//            ->with('')
            ->limit(20) // 取 n条
            ->offset(0) //从第 N+1 条开始
            ->orderBy([
                'id'=>SORT_ASC,  //以id 正序 排列
                'hide'=> SORT_DESC  //以hide 倒序
            ])
            ->asArray()  // 以数组的形式返回
            ->all(); // 返回全部

    }


}
